package com.eh.base.web;

/**
 * Created by David Li on 2016/10/18.
 */
public enum BaseErrorEnum {
    OK(200, "服务调用成功"),
    FAIL(4000006, "系统内部错误"),
    SESSION_TIMEOUT(4000000, "Session超时"),
    INVALID_PARAMETER(4000001, "参数无效"),
    UNAUTHORIZED_OPERATE(4000002, "无权限操作"),
    QL_INVALID_AUTHENTICATION(4000003, "验证码无效"),
    BALANCE_ENOUGH(4000004, "可用余额不够"),
    CONNECTION_TIMEOUT(4000005, "连接服务超时"),
    INTERNAL_ERROR(4000006, "系统内部错误"),
    NO_BANK_CODE_ERROR(4000007, "根据银行简码没有查到银行信息或者银行验证渠道错误"),
    NOT_FOUND(4000008, "找不到服务"),
    NOT_SUPPORT(4000009, "http方法不支持"),
    OPERATION_TOO_FREQUENT(4000010, "操作过于频繁");


    int code;

    String message;

    BaseErrorEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCodeStr() {
        return String.valueOf(code);
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
